package com.sq.shangcheng.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.Ordered;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class DefaultView implements WebMvcConfigurer {
    @Override
    public void addViewControllers(ViewControllerRegistry registry){
//        registry.addViewController("/").setViewName("forward:/goods_list_new.html");//指定某个页面为首页
//        registry.addViewController("/").setViewName("forward:/goods_list_new.html");//指定某个页面为首页
        registry.addViewController("/").setViewName("forward:/login/index");//跳转到首页
        registry.setOrder(Ordered.HIGHEST_PRECEDENCE);
    }
}
